// MESSAGE KF_P0Q support class

#pragma once

namespace mavlink {
namespace fppa {
namespace msg {

/**
 * @brief KF_P0Q message
 *
 * kF_P0Q
 */
struct KF_P0Q : mavlink::Message {
    static constexpr msgid_t MSG_ID = 28;
    static constexpr size_t LENGTH = 240;
    static constexpr size_t MIN_LENGTH = 240;
    static constexpr uint8_t CRC_EXTRA = 126;
    static constexpr auto NAME = "KF_P0Q";


    std::array<float, 30> P0; /*<  P0 */
    std::array<float, 30> Q; /*<  Q */


    inline std::string get_name(void) const override
    {
            return NAME;
    }

    inline Info get_message_info(void) const override
    {
            return { MSG_ID, LENGTH, MIN_LENGTH, CRC_EXTRA };
    }

    inline std::string to_yaml(void) const override
    {
        std::stringstream ss;

        ss << NAME << ":" << std::endl;
        ss << "  P0: [" << to_string(P0) << "]" << std::endl;
        ss << "  Q: [" << to_string(Q) << "]" << std::endl;

        return ss.str();
    }

    inline void serialize(mavlink::MsgMap &map) const override
    {
        map.reset(MSG_ID, LENGTH);

        map << P0;                            // offset: 0
        map << Q;                             // offset: 120
    }

    inline void deserialize(mavlink::MsgMap &map) override
    {
        map >> P0;                            // offset: 0
        map >> Q;                             // offset: 120
    }
};

} // namespace msg
} // namespace fppa
} // namespace mavlink
